/*
//              INTEL CORPORATION PROPRIETARY INFORMATION
//  This software is supplied under the terms of a license  agreement or
//  nondisclosure agreement with Intel Corporation and may not be copied
//  or disclosed except in  accordance  with the terms of that agreement.
//    Copyright (c) 2006-2007 Intel Corporation. All Rights Reserved.
//
*/
#include "umc_defs.h"
#if defined (UMC_ENABLE_DV_VIDEO_ENCODER)

#ifndef __DV_VIDEO_ENCODER_H
#define __DV_VIDEO_ENCODER_H

#include "umc_video_encoder.h"
#include "ippdefs.h"

namespace UMC
{

class DVSegmentWriter;
class SegmentCompressor;
class SegmentReader;

class DVVideoEncoder : public VideoEncoder
{
    DYNAMIC_CAST_DECL(DVVideoEncoder, VideoEncoder)

public:
    DVVideoEncoder(void);
    ~DVVideoEncoder(void);

    virtual Status Init(BaseCodecParams *init);
    virtual Status GetFrame(MediaData *pInData, MediaData *pOutData);
    virtual Status GetInfo(BaseCodecParams *info);
    virtual Status Close();
    virtual Status Reset();
    virtual Status SetParams(BaseCodecParams* params);

protected:
    VideoEncoderParams  m_Params;

    bool        m_bIsInit;
    DVSegmentWriter *m_pDVWriter;                      // (DVSDSegmentWriter *) pointer to DV segment writer
    SegmentCompressor *m_pSCompressor;                 // (SegmentCompressor *) pointer to segment compressor
    SegmentReader *m_pSReader;                         // (SegmentReader *) pointer to segment reader

    //Pointer to Huffman Table
    Ipp8u* newHuffmanTablesBuffer;

    //Init Huffman tables
    void InitHuffmanTables(Ipp8u* HuffmanTablesBuffer);

    Ipp16s m_iMaxI;                                     // Number of DIF sequences (10 - ntsc, 12 - pal)
};


}//namespace UMC

#endif //__DV_VIDEO_ENCODER_H

#endif //(UMC_ENABLE_DV_VIDEO_ENCODER)
